package com.example.demo.mapper;

import com.example.demo.entity.People;
import org.apache.ibatis.annotations.*;

import java.util.List;


@Mapper
public interface PeopleMapper {
    @Insert("insert into people(id,pname,ppassword,pemail,time)values(#{id},#{pname},#{ppassword},#{pemail},#{time})")
    public int insertUser(People people);
    @Select("select id,pname,pemail,ppassword,time from people")
    public List<People> getAll();
    @Delete(" delete from people")
    public int delete(int id);
    @Update("update people set pname=#{pname},ppassword=#{ppassword},pemail=#{pemail},time=#{time} where id=#{id}")
    public int update(People people);
}
